<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<script type="text/javascript">
$('#tt').tabs({
    border:false,
    onSelect:function(title){
		alert(title+' is selected');
    }
});

function tables(tk){
 	$('#tk_jieguo').datagrid({    
 		//数据源地址
 		url:'tikuchaxun',
 		queryParams:{
 			qsbbank:tk
 		},
	    columns:[[
	    	{field:'EMPID',fixed:false,width:180,title:'题库编号',align:'center'},
	    	{field:'QSBBANK',fixed:false,width:180,title:'题库名',align:'center'},    
	        {field:'OUTNAME',fixed:false,width:180,title:'试卷',align:'center'},
	        {field:'TMZSD',fixed:false,width:180,title:'知识点',align:'center'},
	        {field:'TMNYD',fixed:false,width:180,title:'难易度',align:'center'}
	    
	    ]],
	    pagination:true,
	    pageNumber:1,
	    pageSize:5,
	    pageList:[5,10,15]      
	});
}	
function tikusousuo(value,name){
    tables(value);
}
$(function(){
 tables(null);
 
	$(".pxkjpf_xianshi").click(function(){
		tables();
	})
 	
})	 
 	 $(".tk_dan").click(function(){
		var text='选择题';
		var url="tyl/tk-dan-shun";
		add(text,url)
	});
 	 
 	
 	$(".tk_zong").click(function(){
		var text='综合题';
		var url="tyl/tk-zong-he";
		add(text,url)
 });
 function add(text,url){
	if(url!=undefined){
		$('#tit').tabs('add',{
			id: 'tit1',
			title: text,
			closable: true,
			href: "http://localhost:8080/"+url
		});
	}
	} 

</script>
			    	   
				<div class="tiku_zong">
				
				    <div class="tiku_shang">
				              <div class="tk_xianshi">
				                  <button class="tk_dan">选择题</button>
				                  <button class="tk_zong">综合题</button>
				              </div>
				              <div class="tk_shanchu">
				                  <input id="ss" class="easyui-searchbox" style="width:300px" data-options="searcher:tikusousuo,prompt:'请输入需要查询的题库名'"></input>					         
				                  
				              </div>
				    </div>
				    <div class="tiku_xia">
				             <table id="tk_jieguo" class="easyui-datagrid" style="width:100%;height:350px;margin-top:20px;margin-left:10px;" data-options="fitColumns:true">
                                 
                            </table>
				    </div>
				</div>
			
</body>
</html>